Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Member
and running this code: Clicking on /.../qdrant_client/check_depr.py:59 path should lead to |
joein
requested changes
Dec 18, 2024
joein
reviewed
Dec 31, 2024
joein
requested changes
Jan 3, 2025
Comment on lines
+80
to
+84
| show_warning( | ||
| message=f"Collection appears to be None before closing. The existing collections are: " | ||
| f"{list(self.collections.keys())}", | ||
| category=UserWarning, | ||
| stacklevel=5, |
Member
There was a problem hiding this comment.
stacklevel should be 4 and it should also be show_warning_once, since we don't provide collection name here
the output with stacklevel=5:
sys:1: UserWarning: Collection appears to be None before closing. The existing collections are: ['test']
stacklevel=4:
/.../qdrant_client/check_warnings/local_close_collection.py:6: UserWarning: Collection appears to be None before closing. The existing collections are: ['test']
cl.close()
/.../qdrant/qdrant_client/qdrant_client/qdrant_client.py:157: UserWarning: Collection appears to be None before closing. The existing collections are: ['test']
the script I used to reproduce:
from qdrant_client import QdrantClient, models
cl = QdrantClient(":memory:")
cl.create_collection('test', vectors_config=models.VectorParams(size=2, distance=models.Distance.COSINE))
cl._client.collections = {x: None for x in cl._client.collections}
cl.close()
| "with large datasets.", | ||
| category=UserWarning, | ||
| idx="large-local-collection", | ||
| stacklevel=6, |
Member
There was a problem hiding this comment.
might be show_warning, since we are providing collection name here
| warnings.warn("Auth token provider is used with an insecure connection.") | ||
| show_warning( | ||
| message="Auth token provider is used with an insecure connection.", | ||
| category=RuntimeWarning, |
| warnings.warn("Api key is used with an insecure connection.") | ||
| show_warning( | ||
| message="Api key is used with an insecure connection.", | ||
| category=RuntimeWarning, |
Member
|
Also is still using logging.warning Should be updated here |
Co-authored-by: George <george.panchuk@qdrant.tech>
4978661 to
4bf910e
Compare
joein
approved these changes
Jan 6, 2025
joein
added a commit
that referenced
this pull request
Jan 16, 2025
* refactor: Refactored the way of warnings * remove unused imports * fix: Fix stacklevel in warnings * regenerated async * nit * Updated some warnings with show once * fix: Fix stack levels * Updated async * Update qdrant_client/qdrant_remote.py Co-authored-by: George <george.panchuk@qdrant.tech> * Update async client * Updated warnings * Updated warnings * Updated warnings * fix: fix warning level * fix: fix warning level in async * fix: revert append payload condition --------- Co-authored-by: George <george.panchuk@qdrant.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
pre-commitwithpip3 install pre-commitand set up hooks withpre-commit install?Changes to Core Features: